/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "basisofrecord")
@NamedQueries({
    @NamedQuery(name = "Basisofrecord.findAll", query = "SELECT b FROM Basisofrecord b"),
    @NamedQuery(name = "Basisofrecord.findByIdbasisofrecord", query = "SELECT b FROM Basisofrecord b WHERE b.idbasisofrecord = :idbasisofrecord"),
    @NamedQuery(name = "Basisofrecord.findByBasisofrecord", query = "SELECT b FROM Basisofrecord b WHERE b.basisofrecord = :basisofrecord")})
public class Basisofrecord implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idbasisofrecord")
    private Integer idbasisofrecord;
    @Basic(optional = false)
    @Column(name = "basisofrecord")
    private String basisofrecord;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "basisofrecord", fetch = FetchType.LAZY)
    private List<Recordlevelelement> recordlevelelementList;

    public Basisofrecord() {
    }

    public Basisofrecord(Integer idbasisofrecord) {
        this.idbasisofrecord = idbasisofrecord;
    }

    public Basisofrecord(Integer idbasisofrecord, String basisofrecord) {
        this.idbasisofrecord = idbasisofrecord;
        this.basisofrecord = basisofrecord;
    }

    public Integer getIdbasisofrecord() {
        return idbasisofrecord;
    }

    public void setIdbasisofrecord(Integer idbasisofrecord) {
        this.idbasisofrecord = idbasisofrecord;
    }

    public String getBasisofrecord() {
        return basisofrecord;
    }

    public void setBasisofrecord(String basisofrecord) {
        this.basisofrecord = basisofrecord;
    }

    public List<Recordlevelelement> getRecordlevelelementList() {
        return recordlevelelementList;
    }

    public void setRecordlevelelementList(List<Recordlevelelement> recordlevelelementList) {
        this.recordlevelelementList = recordlevelelementList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idbasisofrecord != null ? idbasisofrecord.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Basisofrecord)) {
            return false;
        }
        Basisofrecord other = (Basisofrecord) object;
        if ((this.idbasisofrecord == null && other.idbasisofrecord != null) || (this.idbasisofrecord != null && !this.idbasisofrecord.equals(other.idbasisofrecord))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Basisofrecord[idbasisofrecord=" + idbasisofrecord + "]";
    }

}
